package com.lt.integration.jpa.validation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 验证字段不能同时为空
 * @author: xiaobin
 * @create: 2020-05-12 15:23
 */
@Repeatable(NotAllNulls.class)
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {NotAllNullValidator.class})
public @interface NotAllNull {
    String message() default "The fields cannot all be empty.";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};

    String[] values();
}
